import "package:flutter/material.dart";

class MaterialTheme {
  final TextTheme textTheme;

  const MaterialTheme(this.textTheme);

  static ColorScheme lightScheme() {
    return const ColorScheme(
      brightness: Brightness.light,
      primary: Color(4279256255),
      surfaceTint: Color(4280898766),
      onPrimary: Color(4294967295),
      primaryContainer: Color(4282739941),
      onPrimaryContainer: Color(4294967295),
      secondary: Color(4283456651),
      onSecondary: Color(4294967295),
      secondaryContainer: Color(4291022591),
      onSecondaryContainer: Color(4281219687),
      tertiary: Color(4286784654),
      onTertiary: Color(4294967295),
      tertiaryContainer: Color(4289547702),
      onTertiaryContainer: Color(4294967295),
      error: Color(4290386458),
      onError: Color(4294967295),
      errorContainer: Color(4294957782),
      onErrorContainer: Color(4282449922),
      surface: Color(4294637823),
      onSurface: Color(4279900963),
      onSurfaceVariant: Color(4282598996),
      outline: Color(4285822597),
      outlineVariant: Color(4291085782),
      shadow: Color(4278190080),
      scrim: Color(4278190080),
      inverseSurface: Color(4281282616),
      inversePrimary: Color(4290168063),
      primaryFixed: Color(4292665855),
      onPrimaryFixed: Color(4278195791),
      primaryFixedDim: Color(4290168063),
      onPrimaryFixedVariant: Color(4278205105),
      secondaryFixed: Color(4292665855),
      onSecondaryFixed: Color(4278786116),
      secondaryFixedDim: Color(4290299130),
      onSecondaryFixedVariant: Color(4281877618),
      tertiaryFixed: Color(4294956796),
      onTertiaryFixed: Color(4281729085),
      tertiaryFixedDim: Color(4294814463),
      onTertiaryFixedVariant: Color(4286060420),
      surfaceDim: Color(4292467172),
      surfaceBright: Color(4294637823),
      surfaceContainerLowest: Color(4294967295),
      surfaceContainerLow: Color(4294177533),
      surfaceContainer: Color(4293848568),
      surfaceContainerHigh: Color(4293453810),
      surfaceContainerHighest: Color(4293059052),
    );
  }

  ThemeData light() {
    return theme(lightScheme());
  }

  static ColorScheme lightMediumContrastScheme() {
    return const ColorScheme(
      brightness: Brightness.light,
      primary: Color(4278204328),
      surfaceTint: Color(4280898766),
      onPrimary: Color(4294967295),
      primaryContainer: Color(4282739941),
      onPrimaryContainer: Color(4294967295),
      secondary: Color(4281614446),
      onSecondary: Color(4294967295),
      secondaryContainer: Color(4284904099),
      onSecondaryContainer: Color(4294967295),
      tertiary: Color(4285730943),
      onTertiary: Color(4294967295),
      tertiaryContainer: Color(4289547702),
      onTertiaryContainer: Color(4294967295),
      error: Color(4287365129),
      onError: Color(4294967295),
      errorContainer: Color(4292490286),
      onErrorContainer: Color(4294967295),
      surface: Color(4294637823),
      onSurface: Color(4279900963),
      onSurfaceVariant: Color(4282335824),
      outline: Color(4284243565),
      outlineVariant: Color(4286085769),
      shadow: Color(4278190080),
      scrim: Color(4278190080),
      inverseSurface: Color(4281282616),
      inversePrimary: Color(4290168063),
      primaryFixed: Color(4282739941),
      onPrimaryFixed: Color(4294967295),
      primaryFixedDim: Color(4280701387),
      onPrimaryFixedVariant: Color(4294967295),
      secondaryFixed: Color(4284904099),
      onSecondaryFixed: Color(4294967295),
      secondaryFixedDim: Color(4283259529),
      onSecondaryFixedVariant: Color(4294967295),
      tertiaryFixed: Color(4289547702),
      onTertiaryFixed: Color(4294967295),
      tertiaryFixedDim: Color(4287705755),
      onTertiaryFixedVariant: Color(4294967295),
      surfaceDim: Color(4292467172),
      surfaceBright: Color(4294637823),
      surfaceContainerLowest: Color(4294967295),
      surfaceContainerLow: Color(4294177533),
      surfaceContainer: Color(4293848568),
      surfaceContainerHigh: Color(4293453810),
      surfaceContainerHighest: Color(4293059052),
    );
  }

  ThemeData lightMediumContrast() {
    return theme(lightMediumContrastScheme());
  }

  static ColorScheme lightHighContrastScheme() {
    return const ColorScheme(
      brightness: Brightness.light,
      primary: Color(4278197086),
      surfaceTint: Color(4280898766),
      onPrimary: Color(4294967295),
      primaryContainer: Color(4278204328),
      onPrimaryContainer: Color(4294967295),
      secondary: Color(4279312203),
      onSecondary: Color(4294967295),
      secondaryContainer: Color(4281614446),
      onSecondaryContainer: Color(4294967295),
      tertiary: Color(4282449994),
      onTertiary: Color(4294967295),
      tertiaryContainer: Color(4285730943),
      onTertiaryContainer: Color(4294967295),
      error: Color(4283301890),
      onError: Color(4294967295),
      errorContainer: Color(4287365129),
      onErrorContainer: Color(4294967295),
      surface: Color(4294637823),
      onSurface: Color(4278190080),
      onSurfaceVariant: Color(4280296240),
      outline: Color(4282335824),
      outlineVariant: Color(4282335824),
      shadow: Color(4278190080),
      scrim: Color(4278190080),
      inverseSurface: Color(4281282616),
      inversePrimary: Color(4293520383),
      primaryFixed: Color(4278204328),
      onPrimaryFixed: Color(4294967295),
      primaryFixedDim: Color(4278199414),
      onPrimaryFixedVariant: Color(4294967295),
      secondaryFixed: Color(4281614446),
      onSecondaryFixed: Color(4294967295),
      secondaryFixedDim: Color(4280101462),
      onSecondaryFixedVariant: Color(4294967295),
      tertiaryFixed: Color(4285730943),
      onTertiaryFixed: Color(4294967295),
      tertiaryFixedDim: Color(4283564125),
      onTertiaryFixedVariant: Color(4294967295),
      surfaceDim: Color(4292467172),
      surfaceBright: Color(4294637823),
      surfaceContainerLowest: Color(4294967295),
      surfaceContainerLow: Color(4294177533),
      surfaceContainer: Color(4293848568),
      surfaceContainerHigh: Color(4293453810),
      surfaceContainerHighest: Color(4293059052),
    );
  }

  ThemeData lightHighContrast() {
    return theme(lightHighContrastScheme());
  }

  static ColorScheme darkScheme() {
    return const ColorScheme(
      brightness: Brightness.dark,
      primary: Color(4290168063),
      surfaceTint: Color(4290168063),
      onPrimary: Color(4278200190),
      primaryContainer: Color(4282739941),
      onPrimaryContainer: Color(4294967295),
      secondary: Color(4290299130),
      onSecondary: Color(4280364634),
      secondaryContainer: Color(4281219943),
      onSecondaryContainer: Color(4291088383),
      tertiary: Color(4294814463),
      onTertiary: Color(4283957347),
      tertiaryContainer: Color(4289547702),
      onTertiaryContainer: Color(4294967295),
      error: Color(4294948011),
      onError: Color(4285071365),
      errorContainer: Color(4287823882),
      onErrorContainer: Color(4294957782),
      surface: Color(4279309082),
      onSurface: Color(4293059052),
      onSurfaceVariant: Color(4291085782),
      outline: Color(4287533215),
      outlineVariant: Color(4282598996),
      shadow: Color(4278190080),
      scrim: Color(4278190080),
      inverseSurface: Color(4293059052),
      inversePrimary: Color(4280898766),
      primaryFixed: Color(4292665855),
      onPrimaryFixed: Color(4278195791),
      primaryFixedDim: Color(4290168063),
      onPrimaryFixedVariant: Color(4278205105),
      secondaryFixed: Color(4292665855),
      onSecondaryFixed: Color(4278786116),
      secondaryFixedDim: Color(4290299130),
      onSecondaryFixedVariant: Color(4281877618),
      tertiaryFixed: Color(4294956796),
      onTertiaryFixed: Color(4281729085),
      tertiaryFixedDim: Color(4294814463),
      onTertiaryFixedVariant: Color(4286060420),
      surfaceDim: Color(4279309082),
      surfaceBright: Color(4281809217),
      surfaceContainerLowest: Color(4278980117),
      surfaceContainerLow: Color(4279900963),
      surfaceContainer: Color(4280164135),
      surfaceContainerHigh: Color(4280822321),
      surfaceContainerHighest: Color(4281545788),
    );
  }

  ThemeData dark() {
    return theme(darkScheme());
  }

  static ColorScheme darkMediumContrastScheme() {
    return const ColorScheme(
      brightness: Brightness.dark,
      primary: Color(4290562559),
      surfaceTint: Color(4290168063),
      onPrimary: Color(4278194499),
      primaryContainer: Color(4284975615),
      onPrimaryContainer: Color(4278190080),
      secondary: Color(4290562558),
      onSecondary: Color(4278391359),
      secondaryContainer: Color(4286746561),
      onSecondaryContainer: Color(4278190080),
      tertiary: Color(4294881535),
      onTertiary: Color(4281139252),
      tertiaryContainer: Color(4291652309),
      onTertiaryContainer: Color(4278190080),
      error: Color(4294949553),
      onError: Color(4281794561),
      errorContainer: Color(4294923337),
      onErrorContainer: Color(4278190080),
      surface: Color(4279309082),
      onSurface: Color(4294769407),
      onSurfaceVariant: Color(4291349210),
      outline: Color(4288717490),
      outlineVariant: Color(4286612114),
      shadow: Color(4278190080),
      scrim: Color(4278190080),
      inverseSurface: Color(4293059052),
      inversePrimary: Color(4278205363),
      primaryFixed: Color(4292665855),
      onPrimaryFixed: Color(4278193464),
      primaryFixedDim: Color(4290168063),
      onPrimaryFixedVariant: Color(4278201483),
      secondaryFixed: Color(4292665855),
      onSecondaryFixed: Color(4278193464),
      secondaryFixedDim: Color(4290299130),
      onSecondaryFixedVariant: Color(4280759392),
      tertiaryFixed: Color(4294956796),
      onTertiaryFixed: Color(4280614954),
      tertiaryFixedDim: Color(4294814463),
      onTertiaryFixedVariant: Color(4284612718),
      surfaceDim: Color(4279309082),
      surfaceBright: Color(4281809217),
      surfaceContainerLowest: Color(4278980117),
      surfaceContainerLow: Color(4279900963),
      surfaceContainer: Color(4280164135),
      surfaceContainerHigh: Color(4280822321),
      surfaceContainerHighest: Color(4281545788),
    );
  }

  ThemeData darkMediumContrast() {
    return theme(darkMediumContrastScheme());
  }

  static ColorScheme darkHighContrastScheme() {
    return const ColorScheme(
      brightness: Brightness.dark,
      primary: Color(4294769407),
      surfaceTint: Color(4290168063),
      onPrimary: Color(4278190080),
      primaryContainer: Color(4290562559),
      onPrimaryContainer: Color(4278190080),
      secondary: Color(4294769407),
      onSecondary: Color(4278190080),
      secondaryContainer: Color(4290562558),
      onSecondaryContainer: Color(4278190080),
      tertiary: Color(4294965754),
      onTertiary: Color(4278190080),
      tertiaryContainer: Color(4294881535),
      onTertiaryContainer: Color(4278190080),
      error: Color(4294965753),
      onError: Color(4278190080),
      errorContainer: Color(4294949553),
      onErrorContainer: Color(4278190080),
      surface: Color(4279309082),
      onSurface: Color(4294967295),
      onSurfaceVariant: Color(4294769407),
      outline: Color(4291349210),
      outlineVariant: Color(4291349210),
      shadow: Color(4278190080),
      scrim: Color(4278190080),
      inverseSurface: Color(4293059052),
      inversePrimary: Color(4278198896),
      primaryFixed: Color(4293060095),
      onPrimaryFixed: Color(4278190080),
      primaryFixedDim: Color(4290562559),
      onPrimaryFixedVariant: Color(4278194499),
      secondaryFixed: Color(4293060095),
      onSecondaryFixed: Color(4278190080),
      secondaryFixedDim: Color(4290562558),
      onSecondaryFixedVariant: Color(4278391359),
      tertiaryFixed: Color(4294958331),
      onTertiaryFixed: Color(4278190080),
      tertiaryFixedDim: Color(4294881535),
      onTertiaryFixedVariant: Color(4281139252),
      surfaceDim: Color(4279309082),
      surfaceBright: Color(4281809217),
      surfaceContainerLowest: Color(4278980117),
      surfaceContainerLow: Color(4279900963),
      surfaceContainer: Color(4280164135),
      surfaceContainerHigh: Color(4280822321),
      surfaceContainerHighest: Color(4281545788),
    );
  }

  ThemeData darkHighContrast() {
    return theme(darkHighContrastScheme());
  }

  ThemeData theme(ColorScheme colorScheme) => ThemeData(
        useMaterial3: true,
        brightness: colorScheme.brightness,
        colorScheme: colorScheme,
        textTheme: textTheme.apply(
          bodyColor: colorScheme.onSurface,
          displayColor: colorScheme.onSurface,
        ),
        scaffoldBackgroundColor: colorScheme.background,
        canvasColor: colorScheme.surface,
      );

  List<ExtendedColor> get extendedColors => [];
}

class ExtendedColor {
  final Color seed, value;
  final ColorFamily light;
  final ColorFamily lightHighContrast;
  final ColorFamily lightMediumContrast;
  final ColorFamily dark;
  final ColorFamily darkHighContrast;
  final ColorFamily darkMediumContrast;

  const ExtendedColor({
    required this.seed,
    required this.value,
    required this.light,
    required this.lightHighContrast,
    required this.lightMediumContrast,
    required this.dark,
    required this.darkHighContrast,
    required this.darkMediumContrast,
  });
}

class ColorFamily {
  const ColorFamily({
    required this.color,
    required this.onColor,
    required this.colorContainer,
    required this.onColorContainer,
  });

  final Color color;
  final Color onColor;
  final Color colorContainer;
  final Color onColorContainer;
}
